]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/volume: Show input only if stream is running
authorHerman Fries <baracoder@googlemail.com>
Thu, 14 May 2026 13:09:40 +0000 (15:09 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 26 May 2026 23:48:51 +0000 (01:48 +0200)
Input indicator should only show if a stream is in running state,
ignoring passive streams such as echo-cancellation or denoise filters.

The stream-changed listener is required as streams might transition
between idle and running states.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/7217

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4218>

js/ui/status/volume.js

index 99169e024132c166b98f984442c05e7f22b91f3f..fc49cb9ef7a1b210114055e8024f1491a27d5c7a 100644 (file)
@@ -376,6 +376,7 @@ class InputStreamSlider extends StreamSlider {
             'active-input-update', (c, id) => this._setActiveDevice(id),
             'stream-added', () => this._maybeShowInput(),
             'stream-removed', () => this._maybeShowInput(),
+            'stream-changed', () => this._maybeShowInput(),
             this);
 
         this.iconName = 'audio-input-microphone-symbolic';
@@ -414,8 +415,10 @@ class InputStreamSlider extends StreamSlider {
                 'org.PulseAudio.pavucontrol',
             ];
 
-            showInput = this._control.get_source_outputs().some(
-                output => !skippedApps.includes(output.get_application_id()));
+            showInput =
+                this._control.get_sources().some(source => source.state === Gvc.MixerStreamState.RUNNING) &&
+                this._control.get_source_outputs().some(output =>
+                    !skippedApps.includes(output.get_application_id()));
         }
 
         this._showInput = showInput;